<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>邻里社区 - 积分商城</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
        }
        
        body {
            background-color: #f5f7fa;
            color: #333;
            line-height: 1.6;
        }
        
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 15px;
        }
        
        /* 头部样式 */
        header {
            background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
            color: white;
            padding: 15px 0;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            position: sticky;
            top: 0;
            z-index: 100;
        }
        
        .header-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .logo {
            font-size: 24px;
            font-weight: bold;
            display: flex;
            align-items: center;
        }
        
        .logo i {
            margin-right: 10px;
            font-size: 28px;
        }
        
        .user-info {
            display: flex;
            align-items: center;
            gap: 20px;
        }
        
        .points, .task-btn {
            background: rgba(255, 255, 255, 0.2);
            padding: 8px 15px;
            border-radius: 20px;
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .points:hover, .task-btn:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: translateY(-2px);
        }
        
        .task-dropdown {
            position: relative;
            display: inline-block;
        }
        
        .task-menu {
            display: none;
            position: absolute;
            right: 0;
            top: 100%;
            background: white;
            border-radius: 10px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
            width: 180px;
            padding: 10px 0;
            margin-top: 10px;
            z-index: 1000;
        }
        
        .task-menu a {
            display: flex;
            align-items: center;
            padding: 12px 20px;
            color: #333;
            text-decoration: none;
            transition: all 0.2s ease;
        }
        
        .task-menu a:hover {
            background: #f0f5ff;
            color: #2575fc;
        }
        
        .task-menu a i {
            margin-right: 10px;
            width: 20px;
            text-align: center;
        }
        
        .task-dropdown:hover .task-menu {
            display: block;
        }
        
        /* 返回按钮 */
        .back-button {
            display: inline-flex;
            align-items: center;
            padding: 10px 15px;
            margin-bottom: 20px;
            cursor: pointer;
            color: #3498db;
            font-weight: 600;
            border-radius: 5px;
            transition: background 0.3s ease;
        }
        
        .back-button:hover {
            background: #f0f5ff;
        }
        
        .back-button i {
            margin-right: 5px;
        }
        
        /* 页面标题 */
        .page-title {
            display: flex;
            align-items: center;
            margin-bottom: 20px;
            font-size: 24px;
            font-weight: 700;
            color: #2c3e50;
        }
        
        .page-title i {
            margin-right: 10px;
            color: #3498db;
        }
        
        /* 筛选区域 */
        .filters {
            background: white;
            border-radius: 10px;
            padding: 20px;
            margin: 20px 0;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        }
        
        .filter-title {
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 15px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .filter-options {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
        }
        
        .filter-group {
            display: flex;
            flex-direction: column;
            min-width: 200px;
        }
        
        .filter-group label {
            font-size: 14px;
            margin-bottom: 5px;
            color: #666;
        }
        
        .filter-group select, .filter-group input {
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 5px;
            font-size: 14px;
        }
        
        /* 商品网格 */
        .products-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 25px;
            margin: 30px 0;
        }
        
        .product-card {
            background: white;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 6px 15px rgba(0, 0, 0, 0.07);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            cursor: pointer;
        }
        
        .product-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 12px 20px rgba(0, 0, 0, 0.1);
        }
        
        .product-image {
            height: 180px;
            overflow: hidden;
            position: relative;
        }
        
        .product-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.5s ease;
        }
        
        .product-card:hover .product-image img {
            transform: scale(1.05);
        }
        
        .product-tag {
            position: absolute;
            top: 10px;
            right: 10px;
            background: #ff4757;
            color: white;
            padding: 5px 10px;
            border-radius: 3px;
            font-size: 12px;
            font-weight: 500;
        }
        
        .product-info {
            padding: 18px;
        }
        
        .product-title {
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 10px;
            color: #2c3e50;
        }
        
        .product-desc {
            font-size: 14px;
            color: #7f8c8d;
            margin-bottom: 15px;
            height: 40px;
            overflow: hidden;
        }
        
        .product-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .product-price {
            font-size: 18px;
            font-weight: 700;
            color: #e74c3c;
            display: flex;
            align-items: center;
            gap: 5px;
        }
        
        .buy-btn {
            background: #3498db;
            color: white;
            border: none;
            padding: 8px 15px;
            border-radius: 5px;
            cursor: pointer;
            font-weight: 600;
            transition: background 0.3s ease;
            display: flex;
            align-items: center;
            gap: 5px;
        }
        
        .buy-btn:hover {
            background: #2980b9;
        }
        
        /* 页面内容区 */
        .page {
            display: none;
        }
        
        .page.active {
            display: block;
        }
        
        /* 商品详情页 */
        .product-detail {
            background: white;
            border-radius: 10px;
            padding: 25px;
            margin: 20px 0;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        }
        
        .detail-header {
            display: flex;
            gap: 30px;
            margin-bottom: 25px;
        }
        
        .detail-image {
            flex: 1;
            max-width: 400px;
            border-radius: 10px;
            overflow: hidden;
        }
        
        .detail-image img {
            width: 100%;
            height: auto;
            display: block;
        }
        
        .detail-info {
            flex: 1;
        }
        
        .detail-title {
            font-size: 24px;
            font-weight: 700;
            margin-bottom: 15px;
            color: #2c3e50;
        }
        
        .detail-price {
            font-size: 28px;
            color: #e74c3c;
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 20px;
        }
        
        .detail-stock {
            font-size: 16px;
            margin-bottom: 20px;
            color: #27ae60;
        }
        
        .detail-desc {
            font-size: 16px;
            line-height: 1.8;
            color: #555;
            margin-bottom: 25px;
        }
        
        .exchange-section {
            background: #f9f9f9;
            padding: 20px;
            border-radius: 10px;
            margin-top: 20px;
        }
        
        .exchange-title {
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 15px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .quantity-selector {
            display: flex;
            align-items: center;
            gap: 15px;
            margin-bottom: 20px;
        }
        
        .quantity-btn {
            width: 36px;
            height: 36px;
            border: 1px solid #ddd;
            background: white;
            border-radius: 50%;
            font-size: 18px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .quantity-input {
            width: 60px;
            text-align: center;
            padding: 8px;
            border: 1px solid #ddd;
            border-radius: 5px;
            font-size: 16px;
        }
        
        .total-points {
            font-size: 20px;
            font-weight: 600;
            color: #e74c3c;
            margin-bottom: 20px;
        }
        
        .address-input {
            width: 100%;
            padding: 12px;
            border: 1px solid #ddd;
            border-radius: 5px;
            font-size: 16px;
            margin-bottom: 20px;
            resize: vertical;
            min-height: 80px;
        }
        
        .exchange-btn {
            background: #3498db;
            color: white;
            border: none;
            padding: 12px 30px;
            border-radius: 5px;
            cursor: pointer;
            font-weight: 600;
            font-size: 16px;
            transition: background 0.3s ease;
            display: block;
            width: 100%;
        }
        
        .exchange-btn:hover {
            background: #2980b9;
        }
        
        /* 订单页面 */
        .orders-tabs {
            display: flex;
            background: white;
            border-radius: 10px 10px 0 0;
            overflow: hidden;
            margin-top: 20px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        }
        
        .order-tab {
            flex: 1;
            text-align: center;
            padding: 15px;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.3s ease;
            border-bottom: 3px solid transparent;
        }
        
        .order-tab.active {
            border-bottom: 3px solid #3498db;
            color: #3498db;
        }
        
        .orders-container {
            background: white;
            border-radius: 0 0 10px 10px;
            padding: 20px;
            margin-bottom: 30px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        }
        
        .order-card {
            display: flex;
            padding: 20px;
            border-bottom: 1px solid #eee;
            gap: 20px;
        }
        
        .order-card:last-child {
            border-bottom: none;
        }
        
        .order-image {
            width: 100px;
            height: 100px;
            border-radius: 10px;
            overflow: hidden;
        }
        
        .order-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .order-info {
            flex: 1;
        }
        
        .order-id {
            font-size: 14px;
            color: #777;
            margin-bottom: 5px;
        }
        
        .order-title {
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 10px;
            color: #2c3e50;
        }
        
        .order-points {
            font-size: 18px;
            color: #e74c3c;
            font-weight: 600;
            margin-bottom: 10px;
        }
        
        .order-status {
            display: inline-block;
            padding: 5px 10px;
            border-radius: 15px;
            font-size: 12px;
            font-weight: 600;
        }
        
        .status-pending {
            background: #ffeaa7;
            color: #d35400;
        }
        
        .status-shipped {
            background: #d6eaf8;
            color: #2874a6;
        }
        
        .status-refund {
            background: #f9e3e3;
            color: #c0392b;
        }
        
        .order-actions {
            display: flex;
            gap: 10px;
            margin-top: 15px;
        }
        
        .action-btn {
            padding: 8px 15px;
            border-radius: 5px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .btn-primary {
            background: #3498db;
            color: white;
            border: none;
        }
        
        .btn-secondary {
            background: transparent;
            color: #3498db;
            border: 1px solid #3498db;
        }
        
        .btn-primary:hover {
            background: #2980b9;
        }
        
        .btn-secondary:hover {
            background: #f0f5ff;
        }
        
        /* 积分明细页 */
        .points-container {
            background: white;
            border-radius: 10px;
            padding: 20px;
            margin: 20px 0;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        }
        
        .points-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }
        
        .points-total {
            font-size: 24px;
            font-weight: 700;
            color: #e74c3c;
        }
        
        .points-filters {
            display: flex;
            gap: 10px;
        }
        
        .points-filter {
            padding: 8px 15px;
            border-radius: 20px;
            background: #f0f5ff;
            color: #3498db;
            font-size: 14px;
            cursor: pointer;
        }
        
        .points-filter.active {
            background: #3498db;
            color: white;
        }
        
        .points-list {
            list-style: none;
        }
        
        .points-item {
            display: flex;
            justify-content: space-between;
            padding: 15px 0;
            border-bottom: 1px solid #eee;
        }
        
        .points-item:last-child {
            border-bottom: none;
        }
        
        .points-detail {
            display: flex;
            flex-direction: column;
        }
        
        .points-reason {
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 5px;
        }
        
        .points-date {
            font-size: 14px;
            color: #777;
        }
        
        .points-amount {
            font-size: 18px;
            font-weight: 700;
        }
        
        .points-earn {
            color: #27ae60;
        }
        
        .points-spend {
            color: #e74c3c;
        }
        
        /* 页脚样式 */
        footer {
            background: #2c3e50;
            color: #ecf0f1;
            padding: 30px 0;
            margin-top: 40px;
        }
        
        .footer-content {
            display: flex;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 30px;
        }
        
        .footer-section {
            flex: 1;
            min-width: 200px;
        }
        
        .footer-section h3 {
            font-size: 18px;
            margin-bottom: 15px;
            position: relative;
            padding-bottom: 10px;
        }
        
        .footer-section h3::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 40px;
            height: 2px;
            background: #3498db;
        }
        
        .footer-section ul {
            list-style: none;
        }
        
        .footer-section ul li {
            margin-bottom: 10px;
        }
        
        .footer-section ul li a {
            color: #bdc3c7;
            text-decoration: none;
            transition: color 0.3s ease;
        }
        
        .footer-section ul li a:hover {
            color: #3498db;
        }
        
        .copyright {
            text-align: center;
            padding-top: 20px;
            margin-top: 20px;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            color: #bdc3c7;
            font-size: 14px;
        }
        
        /* 响应式设计 */
        @media (max-width: 768px) {
            .header-content {
                flex-direction: column;
                gap: 15px;
            }
            
            .filter-options {
                flex-direction: column;
            }
            
            .products-grid {
                grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            }
            
            .detail-header {
                flex-direction: column;
            }
            
            .detail-image {
                max-width: 100%;
            }
            
            .orders-tabs {
                flex-wrap: wrap;
            }
            
            .order-tab {
                flex: 1 0 50%;
            }
            
            .order-card {
                flex-direction: column;
            }
            
            .order-image {
                width: 100%;
                height: 200px;
            }
            
            .footer-content {
                flex-direction: column;
            }
        }
    </style>
</head>
<body>
    <!-- 头部 -->
    <header>
        <div class="container">
            <div class="header-content">
                <div class="logo">
                    <i class="fas fa-store"></i>
                    <span>邻里社区积分商城</span>
                </div>
                <div class="user-info">
                    <div class="points" onclick="showPage('points-page')">
                        <i class="fas fa-coins"></i>
                        <span>我的积分: 2,580</span>
                    </div>
                    <div class="task-dropdown">
                        <div class="task-btn">
                            <i class="fas fa-tasks"></i>
                            <span>积分任务</span>
                        </div>
                        <div class="task-menu">
                            <a href="#">
                                <i class="fas fa-calendar-check"></i>
                                <span>每日签到</span>
                            </a>
                            <a href="#">
                                <i class="fas fa-edit"></i>
                                <span>发布帖子</span>
                            </a>
                            <a href="#">
                                <i class="fas fa-hands-helping"></i>
                                <span>完成求助</span>
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </header>

    <!-- 主要内容 -->
    <div class="container">
        <!-- 商城首页 -->
        <div class="page active" id="mall-page">
            <!-- 筛选区域 -->
            <div class="filters">
                <div class="filter-title">
                    <i class="fas fa-filter"></i>
                    <span>商品筛选</span>
                </div>
                <div class="filter-options">
                    <div class="filter-group">
                        <label for="category">商品分类</label>
                        <select id="category">
                            <option value="">全部商品</option>
                            <option value="daily">日用百货</option>
                            <option value="digital">数码电器</option>
                            <option value="food">食品饮料</option>
                            <option value="book">图书文具</option>
                        </select>
                    </div>
                    <div class="filter-group">
                        <label for="price">积分范围</label>
                        <select id="price">
                            <option value="">全部范围</option>
                            <option value="0-500">500积分以下</option>
                            <option value="500-1000">500-1000积分</option>
                            <option value="1000-2000">1000-2000积分</option>
                            <option value="2000+">2000积分以上</option>
                        </select>
                    </div>
                    <div class="filter-group">
                        <label for="sort">排序方式</label>
                        <select id="sort">
                            <option value="new">最新上架</option>
                            <option value="popular">最受欢迎</option>
                            <option value="price-asc">积分从低到高</option>
                            <option value="price-desc">积分从高到低</option>
                        </select>
                    </div>
                </div>
            </div>

            <!-- 商品网格 -->
            <div class="products-grid">
                <!-- 商品1 -->
                <div class="product-card" onclick="showProductDetail(1)">
                    <div class="product-image">
                        
                        <div class="product-tag">热卖中</div>
                    </div>
                    <div class="product-info">
                        <h3 class="product-title">智能电动牙刷</h3>
                        <p class="product-desc">智能声波震动，30天超长续航，5种清洁模式</p>
                        <div class="product-footer">
                            <div class="product-price">
                                <i class="fas fa-coins"></i>
                                <span>1,200</span>
                            </div>
                            <button class="buy-btn" onclick="event.stopPropagation(); showProductDetail(1);">
                                <i class="fas fa-shopping-cart"></i>
                                <span>兑换</span>
                            </button>
                        </div>
                    </div>
                </div>

                <!-- 商品2 -->
                <div class="product-card" onclick="showProductDetail(2)">
                    <div class="product-image">
                        
                        <div class="product-tag">新品</div>
                    </div>
                    <div class="product-info">
                        <h3 class="product-title">精品咖啡礼盒</h3>
                        <p class="product-desc">精选咖啡豆，浓郁香气，适合咖啡爱好者</p>
                        <div class="product-footer">
                            <div class="product-price">
                                <i class="fas fa-coins"></i>
                                <span>800</span>
                            </div>
                            <button class="buy-btn" onclick="event.stopPropagation(); showProductDetail(2);">
                                <i class="fas fa-shopping-cart"></i>
                                <span>兑换</span>
                            </button>
                        </div>
                    </div>
                </div>

                <!-- 商品3 -->
                <div class="product-card" onclick="showProductDetail(3)">
                    <div class="product-image">
                        
                    </div>
                    <div class="product-info">
                        <h3 class="product-title">便携蓝牙音箱</h3>
                        <p class="product-desc">360°环绕音效，IPX7防水，20小时播放</p>
                        <div class="product-footer">
                            <div class="product-price">
                                <i class="fas fa-coins"></i>
                                <span>1,500</span>
                            </div>
                            <button class="buy-btn" onclick="event.stopPropagation(); showProductDetail(3);">
                                <i class="fas fa-shopping-cart"></i>
                                <span>兑换</span>
                            </button>
                        </div>
                    </div>
                </div>

                <!-- 商品4 -->
                <div class="product-card" onclick="showProductDetail(4)">
                    <div class="product-image">
                        
                    </div>
                    <div class="product-info">
                        <h3 class="product-title">专业瑜伽垫</h3>
                        <p class="product-desc">防滑加厚设计，环保材质，多种尺寸可选</p>
                        <div class="product-footer">
                            <div class="product-price">
                                <i class="fas fa-coins"></i>
                                <span>900</span>
                            </div>
                            <button class="buy-btn" onclick="event.stopPropagation(); showProductDetail(4);">
                                <i class="fas fa-shopping-cart"></i>
                                <span>兑换</span>
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- 商品详情页 -->
        <div class="page" id="product-detail-page">
            <div class="back-button" onclick="showPage('mall-page')">
                <i class="fas fa-arrow-left"></i>
                <span>返回商城</span>
            </div>
            
            <div class="page-title">
                <i class="fas fa-info-circle"></i>
                <span>商品详情</span>
            </div>
            
            <div class="product-detail">
                <div class="detail-header">
                    <div class="detail-image">
                        
                    </div>
                    <div class="detail-info">
                        <h1 class="detail-title">智能电动牙刷</h1>
                        <div class="detail-price">
                            <i class="fas fa-coins"></i>
                            <span>1,200 积分</span>
                        </div>
                        <div class="detail-stock">
                            <i class="fas fa-check-circle"></i>
                            <span>库存充足</span>
                        </div>
                        <p class="detail-desc">
                            智能声波震动牙刷，采用先进声波技术，每分钟震动高达31,000次，有效清除牙菌斑。
                            配备5种清洁模式（清洁、美白、抛光、牙龈护理、敏感），满足不同口腔需求。
                            30天超长续航，IPX7级防水，智能压力感应，防止刷牙用力过猛。
                        </p>
                    </div>
                </div>

                <div class="exchange-section">
                    <h2 class="exchange-title">
                        <i class="fas fa-shopping-cart"></i>
                        <span>兑换商品</span>
                    </h2>
                    <div class="quantity-selector">
                        <span>数量：</span>
                        <button class="quantity-btn" onclick="changeQuantity(-1)">-</button>
                        <input type="number" class="quantity-input" id="quantity" value="1" min="1" max="10">
                        <button class="quantity-btn" onclick="changeQuantity(1)">+</button>
                    </div>
                    <div class="total-points">
                        总计：<span id="total-points">1,200</span> 积分
                    </div>
                    <div>
                        <label for="address">收货地址：</label>
                        <textarea class="address-input" id="address" placeholder="请输入详细的收货地址"></textarea>
                    </div>
                    <button class="exchange-btn" onclick="exchangeProduct()">
                        <i class="fas fa-check-circle"></i>
                        确认兑换
                    </button>
                </div>
            </div>
        </div>

        <!-- 我的订单页 -->
        <div class="page" id="orders-page">
            <div class="back-button" onclick="showPage('mall-page')">
                <i class="fas fa-arrow-left"></i>
                <span>返回商城</span>
            </div>
            
            <div class="page-title">
                <i class="fas fa-clipboard-list"></i>
                <span>我的订单</span>
            </div>
            
            <div class="orders-tabs">
                <div class="order-tab active" onclick="changeOrderTab('all')">全部</div>
                <div class="order-tab" onclick="changeOrderTab('pending')">待发货</div>
                <div class="order-tab" onclick="changeOrderTab('shipped')">已发货</div>
                <div class="order-tab" onclick="changeOrderTab('refund')">退款</div>
            </div>

            <div class="orders-container">
                <!-- 订单1 -->
                <div class="order-card">
                    <div class="order-image">
                        
                    </div>
                    <div class="order-info">
                        <div class="order-id">订单号: OD20230915001</div>
                        <h3 class="order-title">智能电动牙刷</h3>
                        <div class="order-points">1,200 积分</div>
                        <div class="order-status status-pending">待发货</div>
                        <div class="order-actions">
                            <button class="action-btn btn-primary" onclick="showProductDetail(1)">再次兑换</button>
                            <button class="action-btn btn-secondary">查看详情</button>
                        </div>
                    </div>
                </div>

                <!-- 订单2 -->
                <div class="order-card">
                    <div class="order-image">
                        
                    </div>
                    <div class="order-info">
                        <div class="order-id">订单号: OD20230912005</div>
                        <h3 class="order-title">精品咖啡礼盒</h3>
                        <div class="order-points">800 积分</div>
                        <div class="order-status status-shipped">已发货</div>
                        <div class="order-actions">
                            <button class="action-btn btn-primary" onclick="showProductDetail(2)">再次兑换</button>
                            <button class="action-btn btn-secondary">查看详情</button>
                        </div>
                    </div>
                </div>

                <!-- 订单3 -->
                <div class="order-card">
                    <div class="order-image">
                        
                    </div>
                    <div class="order-info">
                        <div class="order-id">订单号: OD20230908012</div>
                        <h3 class="order-title">便携蓝牙音箱</h3>
                        <div class="order-points">1,500 积分</div>
                        <div class="order-status status-refund">退款中</div>
                        <div class="order-actions">
                            <button class="action-btn btn-primary" onclick="showProductDetail(3)">再次兑换</button>
                            <button class="action-btn btn-secondary">查看详情</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- 积分明细页 -->
        <div class="page" id="points-page">
            <div class="back-button" onclick="showPage('mall-page')">
                <i class="fas fa-arrow-left"></i>
                <span>返回商城</span>
            </div>
            
            <div class="page-title">
                <i class="fas fa-coins"></i>
                <span>积分明细</span>
            </div>
            
            <div class="points-container">
                <div class="points-header">
                    <div class="points-total">
                        <i class="fas fa-coins"></i>
                        <span>2,580 积分</span>
                    </div>
                    <div class="points-filters">
                        <div class="points-filter active">全部</div>
                        <div class="points-filter">收入</div>
                        <div class="points-filter">支出</div>
                    </div>
                </div>

                <ul class="points-list">
                    <li class="points-item">
                        <div class="points-detail">
                            <div class="points-reason">发布帖子奖励</div>
                            <div class="points-date">2023-09-15 10:30</div>
                        </div>
                        <div class="points-amount points-earn">+20</div>
                    </li>
                    <li class="points-item">
                        <div class="points-detail">
                            <div class="points-reason">兑换智能电动牙刷</div>
                            <div class="points-date">2023-09-14 15:45</div>
                        </div>
                        <div class="points-amount points-spend">-1,200</div>
                    </li>
                    <li class="points-item">
                        <div class="points-detail">
                            <div class="points-reason">每日签到</div>
                            <div class="points-date">2023-09-14 08:20</div>
                        </div>
                        <div class="points-amount points-earn">+5</div>
                    </li>
                    <li class="points-item">
                        <div class="points-detail">
                            <div class="points-reason">完成求助任务</div>
                            <div class="points-date">2023-09-13 16:30</div>
                        </div>
                        <div class="points-amount points-earn">+50</div>
                    </li>
                    <li class="points-item">
                        <div class="points-detail">
                            <div class="points-reason">兑换精品咖啡礼盒</div>
                            <div class="points-date">2023-09-12 11:20</div>
                        </div>
                        <div class="points-amount points-spend">-800</div>
                    </li>
                </ul>
            </div>
        </div>
    </div>

    <!-- 页脚 -->
    <footer>
        <div class="container">
            <div class="footer-content">
                <div class="footer-section">
                    <h3>关于我们</h3>
                    <ul>
                        <li><a href="#">商城介绍</a></li>
                        <li><a href="#">积分规则</a></li>
                        <li><a href="#">合作品牌</a></li>
                        <li><a href="#">联系我们</a></li>
                    </ul>
                </div>
                <div class="footer-section">
                    <h3>兑换指南</h3>
                    <ul>
                        <li><a href="#">如何赚取积分</a></li>
                        <li><a href="#">如何兑换商品</a></li>
                        <li><a href="#">配送说明</a></li>
                        <li><a href="#">退换货政策</a></li>
                    </ul>
                </div>
                <div class="footer-section">
                    <h3>社区信息</h3>
                    <ul>
                        <li><a href="#">最新活动</a></li>
                        <li><a href="#">社区公告</a></li>
                        <li><a href="#">用户评价</a></li>
                        <li><a href="#">帮助中心</a></li>
                    </ul>
                </div>
            </div>
            <div class="copyright">
                <p>&copy; 2023 邻里社区积分商城 - 版权所有</p>
            </div>
        </div>
    </footer>

    <script>
        // 页面切换功能
        function showPage(pageId) {
            // 隐藏所有页面
            document.querySelectorAll('.page').forEach(page => {
                page.classList.remove('active');
            });
            
            // 显示指定页面
            document.getElementById(pageId).classList.add('active');
            
            // 滚动到顶部
            window.scrollTo(0, 0);
        }
        
        // 显示商品详情
        function showProductDetail(productId) {
            showPage('product-detail-page');
        }
        
        // 更改商品数量
        function changeQuantity(delta) {
            const quantityInput = document.getElementById('quantity');
            let quantity = parseInt(quantityInput.value);
            quantity += delta;
            
            if (quantity < 1) quantity = 1;
            if (quantity > 10) quantity = 10;
            
            quantityInput.value = quantity;
            
            // 更新总积分
            const totalPoints = quantity * 1200;
            document.getElementById('total-points').textContent = totalPoints.toLocaleString();
        }
        
        // 兑换商品
        function exchangeProduct() {
            const quantity = document.getElementById('quantity').value;
            const address = document.getElementById('address').value;
            
            if (!address) {
                alert('请输入收货地址');
                return;
            }
            
            // 模拟兑换成功
            alert(`兑换成功！\n商品：智能电动牙刷\n数量：${quantity}\n总计：${quantity * 1200}积分`);
            
            // 跳转到订单页面
            showPage('orders-page');
        }
        
        // 切换订单标签
        function changeOrderTab(tab) {
            // 移除所有标签的active类
            document.querySelectorAll('.order-tab').forEach(tabElement => {
                tabElement.classList.remove('active');
            });
            
            // 为当前标签添加active类
            event.target.classList.add('active');
            
            // 这里可以根据tab参数筛选订单
            // 实际应用中会发送请求到服务器获取对应状态的订单
        }
        
        // 初始化页面
        document.addEventListener('DOMContentLoaded', function() {
            // 商品卡片点击事件
            document.querySelectorAll('.product-card').forEach(card => {
                card.addEventListener('click', function() {
                    showProductDetail(1);
                });
            });
            
            // 筛选功能
            document.querySelectorAll('select').forEach(select => {
                select.addEventListener('change', function() {
                    console.log(`筛选条件变化: ${this.id} = ${this.value}`);
                    // 在实际应用中，这里应该发送请求到服务器获取筛选后的商品
                });
            });
        });
    </script>
</body>
</html>